<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single Sign On Message File</title>
</head>

<!--- Single Sign On Message File --->

<cfquery name="qryGetPeopleToUpdate" datasource="RosettaProd">
	SELECT RosettaID, UserAccount, UserAccountNM, WFC_PersonID, Null as Pass, Null as Updated,
							CASE ISNULL(P.Nickname, '')
								  WHEN '' THEN RTRIM(P.FirstName) + ' ' + RTRIM(P.LastName)
								  ELSE P.Nickname + ' ' + RTRIM(P.LastName)
							END AS FullName,
		
							CASE Left(UserAccount, 4)
								  WHEN 'ANMC' THEN Right(UserAccount, len(UserAccount)-4) + '@anmc.org'
								  ELSE UserAccount + '@SouthcentralFoundation.com'
							END AS [EMail]
	
	FROM RosettaStone R
		INNER JOIN SCFVM18.WFCSuite.dbo.tPersons P ON R.HRProd_PersonIDNo = P.PersonIdNo AND P.PersonToEffectDate > GETDATE()
		INNER JOIN SCFVM18.WFCSuite.dbo.UserAccount A ON R.WFC_PersonID = A.PersonId 
	WHERE Disabled = 0 and WFC_PersonID is not null and left(UserAccountNM,2) <> 'ZZ' AND RosettaID not in (
							Select RosettaID from Rosetta.dbo.RosettaStone
							Where WFC_PersonID in (
								Select WFC_PersonID
								From Rosetta.dbo.rosettaStone R	
								where WFC_PersonID is not null and disabled = 0
								Group by WFC_PersonID
								Having Count(WFC_PersonID)>1
								)	And left(UserAccount,4) = 'ANMC'
							)
	Order by Lastname
</cfquery>

<cfdump var="#qryGetPeopleToUpdate#">
<cfoutput>
<body>

<!--- Section #1  Mail notification --->
<cfset strBaseMessage = "">


<!---cfloop query="qryGetPeopleToUpdate">
	<cfmail type="html" from="helpdesk@southcentralfoundation.com" to="#Email#" bcc="sjohnston@scf.cc" subject="SCF Kronos upgrades to Single Sign-On - #UserAccount#">
Good morning #FullName#,	<BR /><BR />
		<cfif left(UserAccount, 4) EQ 'ANMC'>	
			<cfset strUserName = right(UserAccount, Len(UserAccount)-4)>
SCF ITS will be upgrading the SCF Kronos system tomorrow to allow single sign-on for users of the SCF system. Unfortunately, because your account is on the ANMC system we will not be able to provide this update to you. You will still need to sign-on to the system the same way as you do currently, but we will need to change your username. This change is necessary to prevent conflict with current/future employees that are on the SCF network system.  We do apologize for the inconvenience. Please give us a call at the Service Desk if you are unable to sign-in to your new account after we make this change. The change will be done tomorrow during lunch to minimize impact of people clocking in and out. We will start the change-over at <strong>12:30pm and it should not take any longer than 15 minutes</strong>. If there is any difficulty signing in to do a timepunch, please just email your supervisor to make the correction after the change-over is complete.  <BR /><BR />

Our records indicate that your windows/network username is <strong>ANMC\#strUserName#</strong> and your Kronos ID is currently <strong>#UserAccountNM#</strong>. Your Kronos username will be changed to <strong>#UserAccount#</strong> tomorrow at 12:30pm. If either of these usernames are not accurate, or you have a different Kronos account, please call the service desk right away to let them know. 
		<cfelseif UserAccount NEQ UserAccountNM>
To ease the process of logging into the Kronos web application, SCF ITS will be changing your Kronos username tomorrow to match your primary windows/network account credentials. This means that you will no longer have to remember a second username and password to sign-in to Kronos. Just use your windows logon when you use the Kronos web application. We hope this will prevent the number of forgotten passwords and locked accounts but please give us a call at the Service Desk if you are unable to sign-in to your new account after we make this change. The change will be done tomorrow during lunch to minimize impact of people clocking in and out. We will start the change-over at <strong>12:30pm and it should not take any longer than 15 minutes</strong>. If there is any difficulty signing in to do a timepunch, please just email your supervisor to make the correction after the change-over is complete.   <BR /><BR />

Our records indicate that your old Kronos username was <strong>#UserAccountNM#</strong> and this will be changed to your primary network username of <strong>#UserAccount#</strong> tomorrow during lunch. If either of these usernames are not your accounts, please call the service desk right away to let them know. 		
	
		<cfelseif UserAccount EQ UserAccountNM>
To ease the process of logging into the Kronos web application, SCF ITS will be upgrading the Kronos system match your Kronos account to your windows/network account credentials. This means that you will no longer have to remember a second password to sign-in to Kronos. Just use your windows logon when you use the Kronos web application. We hope this will prevent the number of forgotten passwords and locked accounts but please give us a call at the Service Desk if you are unable to sign-in to your new account after we make this change. The change will be done tomorrow during lunch to minimize impact of people clocking in and out. We will start the change-over at <strong>12:30pm and it should not take any longer than 15 minutes</strong>. If there is any difficulty signing in to do a timepunch, please just email your supervisor to make the correction after the change-over is complete.   <BR /><BR />

Our records indicate that your Kronos and windows/network usernames (#UserAccount#) are identical. Tomorrow during lunch these accounts will be linked so your windows password will work for both systems. If this username is not accurate, or you have a different Kronos account, please call the service desk right away to let them know. 

		<cfelse>
		UNEXPECTED CRITERIA
		
		</cfif>
<BR /><BR />	
Thank you,<BR />
SCF ITS Service Desk<BR />
x5200<BR />
helpdesk@southcentralfoundation.com
	</cfmail>
	
</cfloop--->
<cfloop query="qryGetPeopleToUpdate">
		<cfif UserAccount NEQ UserAccountNM AND left(UserAccount, 4) NEQ 'ANMC'>
	<cfmail type="html" from="helpdesk@southcentralfoundation.com" to="#Email#" bcc="sjohnston@scf.cc" subject="UPDATE - SCF Kronos upgrades to Single Sign-On - #UserAccount#">
Good morning #FullName#,	<BR /><BR />
To ease the process of logging into the Kronos web application, SCF ITS will be changing your Kronos username tomorrow to match your primary windows/network account credentials. This means that you will no longer have to remember a second username and password to sign-in to Kronos. Just use your windows logon when you use the Kronos web application. We hope this will prevent the number of forgotten passwords and locked accounts but please give us a call at the Service Desk if you are unable to sign-in to your new account after we make this change. The change will be done tomorrow during lunch to minimize impact of people clocking in and out. We will start the change-over at <strong>12:30pm and it should not take any longer than 15 minutes</strong>. If there is any difficulty signing in to do a timepunch, please just email your supervisor to make the correction after the change-over is complete.   <BR /><BR />

Our records indicate that your old Kronos username was <strong>#UserAccountNM#</strong> and this will be changed to your primary network username of <strong>#UserAccount#</strong> tomorrow during lunch. If either of these usernames are not your accounts, please call the service desk right away to let them know. 		
	
<BR /><BR />	
Thank you,<BR />
SCF ITS Service Desk<BR />
x5200<BR />
helpdesk@southcentralfoundation.com
	</cfmail>
		</cfif>
	
</cfloop>



</body>
</cfoutput>
</html>
